export default class extends think.Controller {
      // 验证登录
      $verify_login:boolean = true;

      // 用户信息
      userInfo:object = {};

      __before() {
            this.header("Access-Control-Allow-Origin", "*");
            this.header("Access-Control-Allow-Headers", "*");
            if(this.method==="OPTIONS"){
                  return true;
            }
            if(this.$verify_login && !this.header('token')){
                  return this.fail(1006,'未登录');
            }
            if(this.$verify_login && this.header('token')){
                  
            }
      }

      setUserInfo(data:object):void{
            this.userInfo = data;
      }
}